package cn.com.ctbri.geomonitor.utils;

import java.util.Calendar;
import java.util.Date;

public class TimeUtil {
	/**
	 * @author luis
     * 将长整型时间转化为正常时间
     * @param timestamp
     * @return
     */
    public static Date long2time(Long timestamp) {
        if (0L == timestamp) {
            return new Date();
        } else {
            Calendar calendar = Calendar.getInstance();
            calendar.setTimeInMillis(timestamp);
            return calendar.getTime();
        }
    }
}
